/*
*	File: CoreSkeleton.h
*	Date: 12/06/2011
*	Author: Ivan Gao
*	Desc:
*/
#ifndef CORESKELETON_H_
#define CORESKELETON_H_
#include "CommonDef.h"
#include "Vector.h"
#include <string>
#include <vector>
#include <map>
using namespace std;
class SCoreBone;
class SCoreModel;

class SIMPLEANIMATION_API SCoreSkeleton
{
private:
	vector<SCoreBone *>		m_vecCoreBones;
	map<string, int>		m_mapCoreBoneNames;
	vector<int>				m_vecRootCoreBonesId;
	SVector3				m_sceneAmbientColor;
	string					m_skeletonName;
public:
	SCoreSkeleton ();
	SCoreSkeleton (const string & strName);
	~SCoreSkeleton ();
	int		AddCoreBone (SCoreBone * pCoreBone);
	void	RecursivelyCalculateState ();
	SCoreBone * GetCoreBone (int nCoreBoneId);
	const SCoreBone * GetCoreBone (int nCoreBoneId) const;
	SCoreBone * GetCoreBone (const string & strName);
	const SCoreBone * GetCoreBone (const string & strName) const;
	int GetCoreBoneId (const string strname) const;
	bool MapCoreBoneName (int nCoreBondId, const string strName);
	vector<int> & GetVectorRootCoreBoneId ();
	const vector<int> & GetVectorRootCoreBoneId () const;
	void	CalculateBoundingBoxes (SCoreModel * pCoreModel);
	void	Scale (float scale);
	int		GetNumCoreBones () const;
	void	SetSceneAmbientColor (SVector3 & ambientColor);
	const SVector3 & GetSceneAmbientColor () const;
	void	SetName (const string & strName);
	const string & GetName (void) const;
}; // SCoreSkeleton
#endif	// CORESKELETON_H_